home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / windows / ocx / ipack.exe / FTPGLOB.BAS < prev    next >
Encoding:
BASIC Source File  |  1997-01-13  |  1.2 KB  |  50 lines

  1. Attribute VB_Name = "ftpglob"
  2. Global SelectedServerFile As String
  3.  
  4. Sub SetSelectedServerFile(s As String)
  5.     SelectedServerFile = s
  6. End Sub
  7.  
  8. Function GetSelectedServerFile() As String
  9.     GetSelectedServerFile = SelectedServerFile
  10. End Function
  11. Sub ClearListDir()
  12.     MainForm.listDir.Clear
  13.     SelectedServerFile = ""
  14. End Sub
  15. Function GetCurrentFilename() As String
  16.     Dim s As String
  17.     Dim i As Integer
  18.     
  19.     If (MainForm.listDir.ListIndex = -1) Then
  20.         GetCurrentFilename = ""
  21.     Else
  22.         s = MainForm.listDir.list(MainForm.listDir.ListIndex)
  23.         i = Len(s)
  24.         Do While (Mid(s, i - 1, 1) <> " ")
  25.             i = i - 1
  26.         Loop
  27.         GetCurrentFilename = Mid(s, i)
  28.     End If
  29. End Function
  30.  
  31. Sub Trace(list As ListBox, msg As String)
  32.     Dim crpos As Integer
  33.            
  34.     If (list.ListCount > 100) Then
  35.         list.RemoveItem 0
  36.     End If
  37.     crpos = InStr(msg, vbCrLf)
  38.     If (crpos = 0) Then
  39.         msg = msg & vbCrLf
  40.         crpos = InStr(msg, vbCrLf)
  41.     End If
  42.     Do While (crpos > 0)
  43.         list.AddItem Left(msg, crpos - 1)
  44.         list.ListIndex = list.NewIndex
  45.         msg = Mid(msg, crpos + 2)
  46.         crpos = InStr(msg, vbCrLf)
  47.     Loop
  48. End Sub
  49.  
  50.